<template>
    <view>
        <a-input-search disabled allow-clear v-model:value="deptName" placeholder="请输入职级分类关键词"
            style="width: 200px; margin-bottom: 10px" />

        <a-tree v-model:selectedKeys="selectedKeys" :tree-data="jobStore.types" show-icon default-expand-all
           >
            <template #title="{ typeName, typeCode, id }">
                <view @click="emit('confirm',id)">
                    {{ typeName }}
                </view>
            </template>
        </a-tree>
    </view>
</template>
<script setup>
import useApp from '@/hooks';
const { $ } = useApp();
import useJobStore from '@/module/hrm/store/job';
const emit = defineEmits(['confirm'])
const jobStore = useJobStore();
const selectedKeys = ref([])
jobStore.getTypes().then(res=>{
    console.log(res)
})
</script>